/*
 * @Author: your name
 * @Date: 2024-04-03 20:00:55
 * @LastEditTime: 2024-04-03 20:03:42
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \undefinedc:\Users\ljg\.leetcode\242.有效的字母异位词.cpp
 */
/*
 * @lc app=leetcode.cn id=242 lang=cpp
 *
 * [242] 有效的字母异位词
 */

// @lc code=start
class Solution {
public:
    bool isAnagram(string s, string t) {
        int table[26] = {0};
        for(char ss:s){
            table[ss-'a']++;
        }
        for(char tt:t){
            table[tt-'a']--;
        }
        for(int aa:table){
            if(aa != 0){
                return false;
            }
        }
        return true;
        
    }
};
// @lc code=end

